<%@ Page Language="C#" MasterPageFile="~/MasterPages/manager/manager.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="manager_customers_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h2>Customers</h2>
    <asp:FormView ID="FormView1" runat="server" DataSourceID="odsCustomers" Width="100%">
        <EditItemTemplate>
            ID:
            <asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("ID") %>'>
            </asp:TextBox><br />
            Name:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'>
            </asp:TextBox><br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Update">
            </asp:LinkButton>
            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel">
            </asp:LinkButton>
        </EditItemTemplate>
        <InsertItemTemplate>
            Name:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox><br />
            <asp:Button ID="btnInsert" runat="server" CommandName="Insert" Text="Create New Customer" />
        </InsertItemTemplate>
        <ItemTemplate>
            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                Text="Create a New Customer"></asp:LinkButton>
        </ItemTemplate>
        <EmptyDataTemplate>
            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                Text="Create a New Customer"></asp:LinkButton>
        </EmptyDataTemplate>
    </asp:FormView>
    <br />
    <asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="False" DataSourceID="odsCustomers" DataKeyNames="ID" Width="100%">
        <Columns>
            <asp:TemplateField HeaderText="Name" SortExpression="Name">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="odsCustomers" runat="server" DataObjectTypeName="TanashCMS.Business.TanashCustomer"
        DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}"
        SelectMethod="List" TypeName="TanashCMS.Business.TanashCustomer" UpdateMethod="Update">
    </asp:ObjectDataSource>
</asp:Content>

